package com.neu.af.dataFilter.service;

//import com.github.pagehelper.PageInfo;
import com.neu.af.dataFilter.entity.AbData;
import com.neu.af.dataFilter.entity.Data;
import com.neu.af.dataFilter.entity.TagRuleAlarm;

import java.text.SimpleDateFormat;
import java.util.List;
import java.util.Map;

public interface AbDataService {

    int insert(AbData abData);

    int update(AbData abData);

    int delete(String id);

    AbData getById(String id);

    List<AbData> getAll();

    List<AbData> getAllByFilter(Map<String,Object> map);

    public String[] initsList(int p);

    /**
     * 处理每一次过滤请求
     * @param data 单标签待过滤数据
     * @param tagRuleAlarm 待匹配的tagRuleAlarm
     * @return 装配好的异常数据
     */
    List<AbData> saveAbnormalDataOneTurn(List<Data> data, TagRuleAlarm tagRuleAlarm);

    int saveAbnormalDataOneTag(Data data);
    /**
     * 循环过滤异常数据
     * @param interval 时间间隔/min
     */
    void getAbnormalData(int interval);

    int selectByNameAndTime(Data data);

    void getAbnormalDataMultiThread(int interval, int tagIndex, SimpleDateFormat df);

    void getAbnormalDataMultiThread2(String dataString);


    List<AbData> getAlarmClassByType(Map<String, Object> serachMap);

    Map<String,List<AbData>> getClassOneAlarm(Map<String, Object> serachMap);

    List<AbData> getAlarmClassByGroup(Map<String, Object> serachMap);



    int getKoujing();

    void updateKoujing(Map<String, Object> serachMap);
}
